package com.learning.jsonrpc4jservice.rpc;

import com.googlecode.jsonrpc4j.spring.AutoJsonRpcServiceImpl;
import com.learning.jsonrpc4jservice.bean.User;
import com.learning.jsonrpc4jservice.cliet.ProducerUserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (description)
 *
 * @author jinlong.liao on 2018/4/14
 */
@Service
@AutoJsonRpcServiceImpl
public class ProducerRpcServiceImpl implements ProducerRpcService {

    @Autowired
    ProducerUserClient producerUserClient;

    @Override
    public String hi(String str) {
        return producerUserClient.hi(str);
    }

    @Override
    public List<User> list(List<Integer> ids) {
        return producerUserClient.list(ids);
    }

    @Override
    public User get(Integer id) {
        return producerUserClient.get(id);
    }
}
